extends TankTurret3D

@onready var main_aim_ray = $MainAimRay

var bullet = preload("res://Scenes/bullet.tscn")
var instance

func spawn_projectile():
	instance = bullet.instantiate()
	instance.position = main_aim_ray.global_position
	instance.transform.basis = main_aim_ray.global_transform.basis
	return instance

func fire():
	print('DABUDI')
	var instance = spawn_projectile()
	get_tree().get_root().get_node('World').add_child(instance, true)
